package com.corn.core.base.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.corn.core.base.dao.IBaseDao;

/**
 * 功能：基础service实现类 作者：马东东 时间: 2010-3-24
 * 
 * @param <T>
 */
@Component
public  class BaseService<PK, T> implements IBaseService<PK, T> {
	@Resource
	private IBaseDao<PK,T> baseDao;

	public void save(T entity) throws Exception {
		 this.baseDao.save(entity);
	}

	public void delete(T entity) throws Exception {
		 this.baseDao.deleteEntity(entity);
	}

	public void modify(T pojo)throws Exception {
		this.baseDao.modify(pojo);
	}
	
	public T get(PK k)throws Exception {
		 return this.baseDao.get(k);
	}
	

}
